<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: itrim</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: itrim</td>
      <td class="subheader-left"><a href="matlab:open itrim">View code for itrim</a></td>
    </tr>
  </table>
<h1>itrim</h1><p><span class="helptopic">Trim images</span></p>[<strong>out1</strong>,<strong>out2</strong>] = <span style="color:red>itrim</span>(<strong>im1</strong>,<strong>im2</strong>) returns the central parts of images <strong>im1</strong> and
<strong>im2</strong> as <strong>out1</strong> and <strong>out2</strong> respectively.  When images are rectified or warped
the shapes can become quite distorted and are embedded in rectangular images
surrounded by black of NaN values.  This function crops out the
central rectangular region of each.  It assumes that the undefined pixels
in <strong>im1</strong> and <strong>im2</strong> have values of NaN.  The same cropping is applied to each
input image.

[<strong>out1</strong>,<strong>out2</strong>] = <span style="color:red>itrim</span>(<strong>im1</strong>,<strong>im2</strong>,<strong>T</strong>) as above but the threshold <strong>T</strong> in the range
0 to 1 is used to adjust the level of cropping.  The default is 0.5, a
higher value will include fewer NaN value in the result, a lower value will
include more.

<h2>See also</h2>
<p>
<a href="matlab:doc homwarp">homwarp</a>, <a href="matlab:doc irectify">irectify</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2011 Peter Corke.</p>
</body></html>